
import bus from './EventBus';

function ArticleOperation( props ){
    let id = props.articleId;

    let detail = function(){
        console.log( 'detail' );
        bus.emit( '展示详情' , id );
    }

    let remove = function(){
        console.log( 'remove' );
        bus.emit( '删除文章' , id );
    }

    return (
        <>
            <button onClick={ detail }>详情</button>
            <button onClick={ remove }>删除</button>
        </>
    )
}

export default ArticleOperation ;